<ion-view class="bg">
  <ion-header-bar class="bar bar-positive">
    <button class="button back-button buttons icon ion-ios-arrow-left button-clear" nav-direction="back" ng-click="myGoBack()">返回</button>
    <h3 class="title">地址设置</h3>
    <button class="button button-icon" ng-click="addAddress()">新增</button>
  </ion-header-bar>
  <ion-content>
    <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
    <div ng-if="showloading" class="ion-spinner">
      <ion-spinner icon="lines" class="spinner-calm"></ion-spinner>
    </div>
    <ion-list class="myList" ng-if="showloading==false">
      <h5 ng-if="addressData==undefined" class="notFound">未找到数据</h5>
      <li class="item li" ng-repeat="data in addressData" ng-click="chooseAddress(data)" on-hold="deleteAddress(data.ID)">
        <div class="address-name">
          <i>{{data.CUSTOMER_NAME}}</i>
          <i style="margin-left: 10px;">{{data.CUSTOMER_PHONE}}</i>
          <img ng-if="data.DEFLAULT_ADDRESS=='1'" src="img/default.png">
        </div>
        <div>
          <p class="address-detail">{{data.CONSIGNEE_PROVINCE_NAME+data.CONSIGNEE_CITY_NAME+data.CONSIGNEE_DISTRICT_NAME+data.CUSTOMER_ADDRESS}}</p>
        </div>
        <div class="address-edit" ng-click="changeAddress(data.ID);$event.stopPropagation();">
          <i class="ion-compose"></i>
        </div>
      </li>
    </ion-list>
  </ion-content>
</ion-view>
